﻿using System.Collections.Generic;
using UnityEngine;

public class RandomDropItem : RandomInstantiate
{
    public override List<Transform> DoInstantiate()
    {
        List<Transform> list = base.DoInstantiate();
        foreach (Transform transform in list)
        {
            Item component = transform.GetComponent<Item>();
            if (component != null)
            {
                component.Drop(component.transform.position);
            }
        }
        return list;
    }
}

